import React from 'react'
import './ZxSoreDetail.css'

class ZxSoreDetail extends React.Component{
    constructor(){
        super()
        this.state={
            stars:5
        }
    }
    render(){
        /* 这里ZxComments传过来的评价内容的数据 */
        let {data}=this.props
        console.log(data);
        let {stars}=this.state
        // console.log(data);
         /* 这里是循环的评价的星星个数 */
         let arr=[]
         for(let i=0;i<data.account_score;i++){
             arr.push(<span className='iconfont icon-pingfen1' id='vipStarts' key={i}></span>)
         }
        return(
            /* 用户评价详情 */
            <div className='scoreMainBox'>
                <div className='scoreMain'>
                    {/* 头像 */}
                    <div className='imgHeaderBox'>
                        <img src={data.user_photo_url} alt=""/>
                    </div>
                    <div>
                        {/* 昵称和会员标志 */}
                        <div className='scoreBox'>
                            <span>{data.vipName}</span>
                            <div className='huangguan'>
                               {this.props.children}
                            </div>
                            <br/>
                              {/* arr星星和满意度 */}
                            <div>
                                {arr}
                                {/* 满意或不满意 */}
                                {/* <span>{data.scoreWords}</span> */}
                            </div> 
                        </div>
                    </div>
                    <div className='scoreTimeSet'>
                        <span>{data.evaluate_create_time}</span>
                    </div>
                </div>
                <div className='scoreContent'>
                    <p>{data.evaluate}</p>
                    <div className='scoreContentImg'>
                        <div className='scoreBigImg'>
                            <img src={data.evaluate_url} alt=""/>
                        </div> 
                        <div className='scoreBigImg'>
                            <img src={data.evaluate_url} alt=""/>
                        </div> 
                        <div className='scoreBigImg'>
                            <img src={data.evaluate_url} alt=""/>
                        </div> 
                        <div className='scoreBigImg'>
                            <img src={data.evaluate_url} alt=""/>
                        </div> 
                        <div className='scoreBigImg'>
                            <img src={data.evaluate_url} alt=""/>
                        </div> 
                    </div>
                </div>
            </div>
        )
    }
}
export default ZxSoreDetail